import request from '@/utils/request'

export const dashboardApi = {
  // 获取统计数据
  getStats: () => {
    return request({
      url: '/api/v1/dashboard/stats',
      method: 'get'
    })
  },

  // 获取最近活动
  getRecentActivities: (params = {}) => {
    return request({
      url: '/api/v1/dashboard/activities',
      method: 'get',
      params
    })
  },

  // 获取图表数据
  getChartData: (type, params = {}) => {
    return request({
      url: `/api/v1/dashboard/charts/${type}`,
      method: 'get',
      params
    })
  },

  // 获取用户统计数据（仅管理员）
  getUserStats: () => {
    return request({
      url: '/api/v1/dashboard/admin/user-stats',
      method: 'get'
    })
  }
} 